<?php //strip
/**
 * Administration table implementation for a single playground.
 * 
 * @package odReservationsWpPlugin
 * @subpackage odReservationsWpPlugin_Tables
 * @author Ondrej Donek <ondrejd@gmail.com>
 */
class odReservationsWpPlugin_Tables_Playground extends odWpPlugin_Admin_Table
{
	public function __construct()
	{
		$adminUrl = get_bloginfo('home') . '/wp-admin/admin.php';
		$model = new odReservationsWpPlugin_Models_Playground();
		
		parent::__construct(array(
			'formUrl' => $adminUrl . '?page=' . odReservationsWpPlugin::ID . '-playgrounds',
			'editUrl' => $adminUrl . '?page=' . odReservationsWpPlugin::ID . '-add_playground',
			'use_model' => true,
			'model' => $model,
			'columns' => array(
				'ID' => array(
					'primary' => true,
					'label' => __(' ', odReservationsWpPlugin::TEXTDOMAIN),
					'valueCol' => 'ID'
				),
				'title' => array(
					'label' => __('Název', odReservationsWpPlugin::TEXTDOMAIN),
					'valueCol' => 'title',
					'control' => true
				)
			),
			'bulkActions' => false,
			'filters' => array(),
			'maxrows' => 10,
			'primaryCol' => 'ID',
			'tree' => false,
			'parentCol' => 'parent_ID',
			'editLink' => true,
			'editLinkCol' => 'title' // TODO Duplicity with columns['control']!!!!
		));
	}
} // End of odReservationsWpPlugin_Tables_Playground
